package com.tobe.spring_demo.xmlstart;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

/**
 * @author yangqifan 2015年9月10日
 * 
 */
@Component
public class MyService implements MarkService, InitializingBean{
	
	@Autowired
	private MyDao dao;
	
	@Autowired
	private Apple apple;
	
	public void select(){
		System.out.println(dao.select());
		System.out.println("my apple = " + apple.toString());
	}

	public void afterPropertiesSet() throws Exception {
		System.out.println("run InitializingBean afterPropertiesSet....");
		
	}
	
	public void init(){
		System.out.println("run init....");
	}
	
//	@PostConstruct jsr250
//	public void xxx(){
//		
//	}

}

